package com.enjoy.dome.base.list;

import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;

import com.enjoy.dome.R;
import com.enjoy.dome.base.load.BaseAppLoad;
import com.enjoy.xbase.xui.list.XXBaseListView;
import com.scwang.smart.refresh.header.ClassicsHeader;

public abstract class YygBaseListView extends XXBaseListView {

    public YygBaseListView(Context context) {
        super(context);
    }

    public YygBaseListView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public YygBaseListView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public void onInitBaseComplete() {
        super.onInitBaseComplete();
        //设置 Header 为 贝塞尔雷达 样式
        refreshLayout.setRefreshHeader(new ClassicsHeader(getContext()));
        //设置 Footer 为 球脉冲 样式
        //refreshLayout.setRefreshFooter(new YygRefreshFooter(getContext()));
        refreshLayout.setEnableAutoLoadMore(true);

        setDataBackgroundColor(Color.parseColor("#ffffff"));
        setLoad(new BaseAppLoad());
        setHasFooter(true);
    }
    @Override
    protected int getItemFooterLayoutId() {
        return R.layout.layout_custom_item_foot;
    }
}
